package socket;

public class Threa extends Thread {
    Threa(String name){
        super(name);
    }
    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            System.out.println("Thread" + getName() + "i=" + i);

        try {
                Threa.sleep(2000);
        }catch (InterruptedException e){
            e.printStackTrace();
        }
    }

    }


    public static void main(String[] args)throws InterruptedException {
        Threa th=new Threa("T1");
        Threa th1=new Threa("T2");
        th.start();
        th1.start();
    }





}
